package com.cyzy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.lang.reflect.Type;
import java.time.LocalDateTime;

@NoArgsConstructor
@AllArgsConstructor
@ToString
@Data
@TableName("advert")
public class Advert {
  @TableId(type = IdType.AUTO)
  private long advertId;//广告ID
  private String advertTitle;//广告标题
  private String advertContent;//广告内容
  private String fileId;//广告封面文件ID
  private String linkUrl;//广告链接
  private long advertType;//广告类型：0-课程广告服务  1-校区广告
  private long campusId;//校区ID
  private long courseId;//课程ID
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
  private LocalDateTime startTime;//广告开始时间
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
  private LocalDateTime endTime;//广告结束时间
  private String advertPosition;//广告位置
  private String advertStatus;//广告状态（草稿,待审核,已通过,已拒绝,已发布）
  private String rejectReason;//拒绝原因
  private String createTime;//创建时间
  private String updateTime;//更新时间

  @TableField(exist = false)
  private String url;//图片路径
  @TableField(exist = false)
  private String courseName;//课程名
  @TableField(exist = false)
  private String campusName;//校区名

}
